home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / rcs5ap1m.lzh / MAKEFILE next >
Text File  |  1991-02-19  |  9KB  |  283 lines

  1. # $Id: makefile.,v 1.4 1991/01/30 17:33:42 apratt Exp $
  2. # Copyright (C) 1982, 1988, 1989 Walter Tichy
  3. #   Copyright 1990 by Paul Eggert
  4. #   Distributed under license by the Free Software Foundation, Inc.
  5. #
  6. # This file is part of RCS.
  7. #
  8. # RCS is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 1, or (at your option)
  11. # any later version.
  12. #
  13. # RCS is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with RCS; see the file COPYING.  If not, write to
  20. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21. #
  22. # Report problems and direct all questions to:
  23. #
  24. #    rcs-bugs@cs.purdue.edu
  25. #
  26. #               INSTRUCTIONS
  27. #               ============
  28.  
  29.  
  30. #    Figure out where to put the RCS commands; define RCSDIR accordingly.
  31.  
  32. RCSDIR  = /net/acae127/home/bammi/bin
  33. #RCSDIR = /usr/local/bin
  34.  
  35.  
  36. #    Define INSTALL_SETID_FLAGS as needed to install RCS setgid or setuid.
  37. #    This makes sense only when setegid() and seteuid() work
  38. #    Setgid is better than setuid because it mixes with nonstrict locking.
  39. #INSTALL_SETID_FLAGS = ${INSTALL_NORMAL_FLAGS}
  40. #INSTALL_SETID_FLAGS = -g rcs -o root -m 2555
  41.  INSTALL_SETID_FLAGS = ${INSTALL_NORMAL_FLAGS}
  42.  
  43.  
  44. #    Define RCSPREFIX to be empty if you want RCS to search the PATH for
  45. #    subsidiary RCS commands like co.  This lets you move RCS commands
  46. #    after building them, and permits multiple instances of setgid RCS
  47. #    commands on the same host for different groups.
  48. #
  49. #    Define RCSPREFIX to a path followed by / if you want RCS to look in
  50. #    just one place.  This makes execution faster.  Also, if your host's
  51. #    execvp() system call does not understand the BSD #!/bin/sh convention
  52. #    for starting shell files, you must use a nonempty RCSPREFIX, because
  53. #    in this case rcsmerge invokes `/bin/sh ${RCSPREFIX}merge'.
  54.  
  55. #RCSPREFIX =
  56. #RCSPREFIX = ${RCSDIR}/
  57.  RCSPREFIX = ${RCSDIR}/
  58.  
  59. #    Define DIFF and DIFF3 to be the name of your diff and diff3 programs.
  60. #    DIFF must be an absolute path name if setgid or setuid is used.
  61. #    Define DIFF_FLAGS to be diff's options for RCS format output.
  62. #    If available, use the -a option for comparing arbitrary files.
  63. #    Define DIFF_L to be 1 if your diff understands GNU diff's -L option.
  64. #    Set DIFF3_TYPE=lib for traditional diff, =bin otherwise.
  65. #    If DIFF3_type=bin, make sure your diff3 understands -a, -L, and and -m.
  66. #    If DIFF3_type=lib, avoid the diff3 program visible to users, and
  67. #    use the one in /usr/lib instead; it may be called /usr/lib/diff3prog.
  68.  
  69. # Traditional diff
  70. #DIFF = /bin/diff
  71. #DIFF_FLAGS = -n
  72. #DIFF_L = 0
  73. #DIFF3 = /usr/lib/diff3
  74. #DIFF3_TYPE = lib
  75.  
  76. # GNU diff -- must be version 1.15 or later
  77. DIFFPREFIX = ${RCSDIR}/
  78. DIFF = ${DIFFPREFIX}diff
  79. DIFF_FLAGS = -an
  80. DIFF_L = 1
  81. DIFF3 = ${DIFF}3
  82. DIFF3_TYPE = bin
  83.  
  84. # DIFF = /bin/diff
  85. # DIFF_FLAGS = -n
  86. # DIFF_L = 0
  87. # DIFF3 = /usr/lib/diff3
  88. # DIFF3_TYPE = lib
  89.  
  90.  
  91. #    Set SENDMAIL to be a comma-separated list of strings that are a command
  92. #    to send mail.  The first string should be an absolute pathname.
  93. #    The name of the addressee will be appended as a separate argument,
  94. #    and the standard input will be the message (first line "Subject: xxxx",
  95. #    second line empty).
  96.  
  97. #SENDMAIL = "/bin/mail"
  98. #SENDMAIL = "/etc/delivermail", "-w"
  99. #SENDMAIL = "/usr/lib/sendmail"
  100.  SENDMAIL = "/bin/mail"
  101.  
  102.  
  103. #    Decide what loader libraries you need.
  104. #    Some older hosts need -lBSD, -ljobs, or -lPW.
  105.  
  106. LDLIBS =
  107.  
  108.  
  109. #    Decide what C compiler flags you need.
  110.  
  111. # Optimize.  Put in options that work well for your compiler.
  112. # Options to try with GCC include -fdelayed-branch, -finline-functions,
  113. # -fomit-frame-pointer, and -fstrength-reduce.
  114. CC_O = -O -fstrength-reduce # -finline-functions
  115.  
  116. # Make all initialized data read-only (not just string literals).
  117. # This option can improve performance by making initialized data shared.
  118. # It's not worth worrying about if your compiler supports the `const' keyword.
  119. # 4.3BSD-based compilers
  120. #CC_R = -R
  121. # most other compilers
  122. #CC_R =
  123.  CC_R =
  124.  
  125. # Add this for SunOS 4.1 + GCC 1.37.1.
  126. #COMPILE.c = ${CC} ${CFLAGS} ${CPPFLAGS} -c
  127.  
  128.  
  129. # for GCC
  130. CC = gcc
  131. CC_W = -Wall -Wpointer-arith -Wwrite-strings
  132. CFLAGS = ${CC_O} ${CC_R} ${CC_W}
  133.  
  134. # for traditional C compilers
  135. #CC = cc
  136. #CFLAGS = ${CC_O} ${CC_R}
  137.  
  138. # CC = cc
  139. # CFLAGS = ${CC_O} ${CC_R}
  140.  
  141.  
  142. LINT = lint
  143.  
  144. # For traditional and BSD lint, use
  145. #LINTFLAGS = -abchx
  146. # For USG lint, use
  147. #LINTFLAGS =
  148.  LINTFLAGS = -abchx
  149.  
  150.  
  151. #    If you have version 2 RCS files around, define COMPAT2 to be 1.
  152. #    (Version 2 became obsolete in 1982.)  This assures that version 2
  153. #    RCS files can still be read.  After all version 2 RCS files have
  154. #    been updated with later versions of ci or rcs, you can remake RCS with
  155. #    COMPAT2=0.
  156. COMPAT2 = 0
  157. #    When you have RCS installed, rename old version 2 RCS files as follows
  158. #    (if you have any).  If the working file was "f.c" and the RCS file
  159. #    "f.c.v", rename the RCS file to "f.c,v". If the working file was "f.c"
  160. #    and the RCS file "f.v", rename the RCS file "f.c,v". Thus, suffixes
  161. #    are no longer dropped and RCS files end in ",v" rather than ".v".
  162.  
  163.  
  164. #    Now you are ready.  Try to make "conf.h".
  165. #    Check the resulting conf.h for plausibility.
  166. #    If it's wrong, there is a bug in conf.sh; please report it.
  167. #    You can patch conf.h if you're in a hurry, but it's better to fix it;
  168. #    look at a.h and conf.error for ideas.
  169. #    If all else fails, copy conf.heg to conf.h and edit it by hand.
  170.  
  171. #    Make "all".
  172. #    If all went well, make "install".
  173. #    If installation succeeds, make "installtest";
  174. #    if this fails, make "installdebug" for detailed info.
  175.  
  176. #    If you want to maintain RCS with itself, be sure you preserve the
  177. #    original revision numbers, dates, etc. by checking the
  178. #    files in with the -k option.
  179.  
  180. # Avoid brain damage in some versions of 'make'.
  181. SHELL = /bin/sh
  182.  
  183. # binary commands
  184. BCOMMANDS   =   ci.ttp ident.ttp rcs.ttp rcsdiff.ttp rlog.ttp co.ttp # rcsmerge.ttp 
  185.  
  186. # all commands
  187. RCSCOMMANDS = ${BCOMMANDS} # merge 
  188.  
  189. all :: ${RCSCOMMANDS}
  190.  
  191. INSTALL = install -c
  192. INSTALL_NORMAL_FLAGS = 
  193.  
  194. install :: all
  195.     ${INSTALL} ${INSTALL_SETID_FLAGS} ci ${RCSDIR}
  196.     ${INSTALL} ${INSTALL_SETID_FLAGS} co ${RCSDIR}
  197.     ${INSTALL} ${INSTALL_SETID_FLAGS} rcsdiff ${RCSDIR}
  198.     ${INSTALL} ${INSTALL_SETID_FLAGS} rcsmerge ${RCSDIR}
  199.     ${INSTALL} ${INSTALL_SETID_FLAGS} rlog ${RCSDIR}
  200.     ${INSTALL} ${INSTALL_NORMAL_FLAGS} ident ${RCSDIR}
  201.     ${INSTALL} ${INSTALL_NORMAL_FLAGS} rcs ${RCSDIR}
  202.     ${INSTALL} ${INSTALL_NORMAL_FLAGS} merge ${RCSDIR}
  203.  
  204. installtest ::
  205.     sh rcstest
  206.  
  207. installdebug ::
  208.     sh rcstest -v
  209.  
  210. clean ::
  211.     rm -f a.* *.o conf.h conf.error ${RCSCOMMANDS}
  212.  
  213. conf.h : conf.sh # Makefile
  214.     C='${CC} ${CFLAGS}' \
  215.     COMPAT2='${COMPAT2}' \
  216.     DIFF='${DIFF}' \
  217.     DIFF_L='${DIFF_L}' \
  218.     DIFF_FLAGS='${DIFF_FLAGS}' \
  219.     RCSPREFIX='${RCSPREFIX}' \
  220.     SENDMAIL='${SENDMAIL}' \
  221.     L='${LDLIBS}' \
  222.     sh -x conf.sh 2>conf.error
  223.     mv a.h $@
  224.     rm -f a.*
  225.  
  226. CIFILES = ci.o rcslex.o rcssyn.o rcsgen.o rcsedit.o rcskeys.o rcsmap.o \
  227.     rcsrev.o rcsutil.o rcsfnms.o partime.o maketime.o rcskeep.o rcsfcmp.o
  228. ci.ttp : ${CIFILES} system.o
  229.     ${CC} ${CFLAGS} ${CIFILES} system.o ${LDLIBS} -o $@
  230.  
  231. COFILES = co.o rcslex.o rcssyn.o rcsgen.o rcsedit.o rcskeys.o rcsmap.o \
  232.     rcsrev.o rcsutil.o rcsfnms.o partime.o maketime.o
  233. co.ttp : ${COFILES} system.o
  234.     ${CC} ${CFLAGS} ${COFILES} system.o ${LDLIBS} -o $@
  235.  
  236. ident.ttp : ident.o rcsmap.o
  237.     ${CC} ${CFLAGS} ident.o rcsmap.o ${LDLIBS} -o $@
  238.  
  239. merge : merge.sh
  240.     DIFF=${DIFF} DIFF3=${DIFF3} DIFF3_TYPE=${DIFF3_TYPE} sh $@.sh >$@.o
  241.     chmod +x $@.o
  242.     mv $@.o $@
  243.  
  244. RLOG = rlog.o rcslex.o rcsmap.o rcssyn.o rcsrev.o rcsutil.o partime.o \
  245.     maketime.o rcsfnms.o
  246. rlog.ttp : ${RLOG} system.o
  247.     ${CC} ${CFLAGS} ${RLOG} system.o ${LDLIBS} -o $@
  248.  
  249. RCS = rcs.o rcslex.o rcssyn.o rcsrev.o rcsutil.o rcsgen.o rcsedit.o rcskeys.o \
  250.     rcsma